<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>FrackIM -- Prospective Search on AppEngine Demo by Bob Wyman</title>
<style type="text/css">
body {
  margin: 15px;
  font-family:sans-serif;
}
pre {
  margin-left: 1.0em;
  font-family: Courier New, Courier, mono;
  color: #09571b;
}
</style>
</head>

<body>
<div id="body">
<h2>FrackIM -- <a href="http://code.google.com/appengine/docs/python/prospectivesearch/overview.html">Prospective Search</a> on Google AppEngine Demo</h2>
<p>FrackIM implements something like an IM "party-line" where everyone shares
 a common conversation but can only see those parts of the discussion that
 they have asked to see. To specify what you'd like to see, you can
 "<b>F</b>ollow" a particular publisher or you can "T<b>rack</b>" any message
 whose content matches a query you provide.
 Anything you type into a chat session with FrackIM (unless it is a special command --
 prefaced by "/") will be sent to all other FrackIM users who have
 expressed an interest in what you typed. Similarly, you'll see anything
 that anyone else types -- if you've asked for it.</p>
<p>Not all messages which can be 'fracked' are from people. Some messages come
from updates that are received from a variety of feeds monitored via
<a href="http://code.google.com/p/pubsubhubbub/">PubSubHubbub</a> hubs. To see
a list of these feeds, look at the
<a href="/pshb">list of monitored feeds</a>. If you are the administrator for 
this service, you can add or delete feeds by using the Custom "Manage PSHB Feeds"
page on the application's Dashboard page.</p>
<p>If you'd like to try FrackIM, first add the following JID to your buddy
list in whatever XMPP client you use:
 <pre>{{app_jid}}</pre>
<h3>Source Code</h3>
<p>Source code for this app is available at: <a href="http://code.google.com/p/frackim/"> http://code.google.com/p/frackim/</a><p>
<h3>The Basics</h3>
<p>You can express an interest by either "<b>Follow</b>"ing anything that
 is written by some known contributor to the stream of messages or by
 "<b>Track</b>"ing anything that contains particular words or phrases.
 <p>If you are primarily interested in <i>who</i> said something, you
 can <b>Follow</b> them by creating a subscription that constrains the "follow"
 attribute of messages.
 For instance:
  <pre>/subscribe follow:bob@example.com</pre>
 would ensure that you received any message published by bob@example.com and
  <pre>/subscribe follow:huffingtonpost.com</pre>
 would ensure that you received any message published by any feed hosted on
 "huffingtonpost.com" that FrackIM might be monitoring via PubSubHubbub.</p>
 <p>If you don't care about <i>who</i> said something, but are more interested
 in <i>what</i> was said, you would <b>Track</b> by creating a subscription that
 constrains the "track" attribute of messages.
 For instance:
  <pre>/subscribe track:"Prospective Search"</pre>
 would ensure that you received any message that contained the phrase
 "Prospective Search".</p>
 <p> Of course, you can follow and track at the same time! To see only messages
 sent by Bob which contain the word "rose" issue the following command:
 <pre>/subscribe follow:bob@example.com track:rose</pre>
 If, for some reason, you are only interested in "short" messages from someone,
 you can limit the "size" of messages you'll receive in the following manner:
 <pre>/subscribe follow:bob@example.com size < 140</pre>
<p>In order to get a list of your current subscriptions, just use the "/list" command:
  <pre>/list</pre>
 if you have any current subscriptions, this should list them out as well as show their temporary subscription ids -- like so:
  <pre>
  [1] track:rose
  [2] follow:bob track:foobar size > 10</pre>

 When you're no longer interested in a particular subscription, first list your
 subscriptions to discover the current index number for the subscription from
 which you would like to unsubscribe and then use the /unsubscribe command.
 For instance, to unsubscribe the first subscription listed above, you would type:
 <pre>/unsubscribe 1 </pre>

Note: Commands may be abbreviated to their first letters. Thus, the following
are all supported commands:
  <pre>/h, /s, /u, /l</pre>

<h2>Subscription query language details</h2>

<h3>Fields</h3>
Three fields are supported. They are:
<ul>
<li>follow: A full or partial XMPP JID or HTTP URL (e.g. follow:frackim@appspot.com or follow:frackim)
<li>track: The text of a message.
<li>size: The size of the message in bytes. (Yes, this is silly... But it demonstrates support for numeric types.)
</ul>

<h3>Text operators</h3>
Track fields can be matched for the occurrence of a word or phrase anywhere in
the message's text. To match on a multi-word phrase, use quotes. For example:
<pre>/subscribe track:horse</pre>
<pre>/subscribe track:"horse riding"</pre>
<p>Note: Each term or phrase that you specify may be prefaced by the attribute that
 that it is in. For example, if you want anything that mentions both
 "Google Earth" and "Buzz," then you would subscribe to:
  <pre>/subscribe track:"Google Earth" track:"Buzz"</pre>
If you don't explicitly specify the attribute to which you are subscribing, then
FrackIM will look in all fields. For example:
<pre>/subscribe huffington</pre>
would match any message that contains the word "huffington" in either the track
or follow attribute./</p>
<h3>Logical operators</h3>
Track and Follow predicates can be combined with the NOT, OR and AND operators.
 "AND" is assumed to be the intended operator if none is specified.<br/>
 Terms and groups of terms with operators can also be grouped using parenthesis.
For example: <br/>
<pre>track:flower AND track:"rose petal"</pre>
<pre>(track:bar AND track:foo) OR track:foo@example.com</pre>
<pre>follow:bob NOT track:rose</pre>
<pre>follow:bob@example.com (NOT track:rose)</pre>
NOTE: NOT, OR, and AND <em>must</em> be all-caps.

<h3>Numeric Operators</h3>
Supported numeric operators are:
  <pre> <, >, <=, >=, = </pre>
For example:
 <pre>size < 100</pre>
 <pre>NOT (size = 100)</pre>
 <pre>follow:bob@example.com size > 10</pre>
</div>
</body>

</html>
